package entity;

import control.ForecastEngine;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Temporal;
import javax.validation.constraints.NotNull;

/**
 *
 * @author MONESI
 */
@Entity(name = "EVENTS")

public class Event implements Serializable  {

    
    
    @NotNull(message = "May not be empty")
    private String name;
     
    @Id
    @NotNull(message = "May not be empty")
    public int eventId;
    
    @NotNull(message = "May not be empty")
    private String creatormail;
    
    @NotNull
    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
    public Date date; 
        
    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
    public Date endDate;
    
    
    private String forecast="";
    private String place;
    private int visibility;
    private int duration;
    private String description;
   
    
    
    private static final long serialVersionUID = 1L;
    
    public void setWeather(String forecast){
        
        
        this.forecast=forecast;
    }
    
    public String getForecast(){
        return forecast;
    }
    
    public int getId() {
        return eventId;
    }
    
    public String getCreator(){
        
        return creatormail;
    }
    
    public void setCreator (String creator) {
        this.creatormail = creator;
    }
    
    public void setid (int idEvent) {
        this.eventId = idEvent;
    }
    
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Date getDate() {
        return date;
    }
    
    public void setEndDate(Date enddate) {
        this.endDate = enddate;
    }

    public Date getEndDate() {
        return endDate;
    }
    
    
    public String getPlace() {
        return place;
    }
    
    public void setPlace(String place) {
        this.place = place;
    }
    
    public void setVisibility (int visibility) {
        this.visibility = visibility;
    } 
    
    public int getVisibility() {
        return visibility;
    }
   
    
    public void setDuration (int duration) {
        this.duration = duration;
    }
    
    public int getDuration () {
        return duration;
    }
    
        
    public void setDescription(String description) {
        this.description = description;
    }
    
    public String getDescription() {
        return this.description;
    }
    
   }
